package com.cmict.data.system.api.conf;


import com.cmict.data.system.api.conf.dto.ConfSystemDTO;
import com.cmict.data.system.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO awesome：fallbackFactory =
@Api(tags = "RPC 服务 - 系统设置")
public interface ConfApi {

    String PREFIX = ApiConstants.PREFIX + "/conf";
    /**
     * 获得所有租户
     *
     * @return 租户编号数组
     */
    @GetMapping(PREFIX + "/getConfValueByConfKey")
    @ApiOperation("校验部门是否合法")
    @ApiImplicitParam(name = "confKey", value = "部门编号数组", example = "1,2", required = true, dataTypeClass = String.class)
    ConfSystemDTO getConfValueByConfKey(@RequestParam("confKey") String confKey);

}
